import { createPinia } from "pinia";
import { createPersistedState } from "pinia-plugin-persistedstate";

let pinia = createPinia();

pinia.use(
  //使用持久化插件
  createPersistedState({
    storage: localStorage, //存储位置为localStorage，默认为sessionStorage
  })
);

export default pinia;
